import sqlite3;
from sqlite3 import Error;


def create_connection(db_file):
    """ 创建数据库连接"""
    conn = None
    try:
        conn = sqlite3.connect(db_file)
        print(f"成功连接到SQLite数据库，版本: {sqlite3.version}")
    except Error as e:
        print(e)
    return conn

def create_table(conn, create_table_sql):
    """ 创建表 """
    try:
        c = conn.cursor()
        c.execute(create_table_sql)
        print("表创建成功")
    except Error as e:
        print(e)
        

if __name__ == "__main__":
    
    # data_base = "mostone.db"
    
    # conn = create_connection(data_base)
    # if conn is not None:
    #     pass
    # else:
    #     print("数据库连接失败")
    
    
    
    pass